using System;
using System.Collections.Generic;
using System.Text;

namespace Acms.DataControls
{
    [System.ComponentModel.Designer(typeof(UserPostCommentDataSourceDesigner))]
    [System.Web.UI.ToolboxData("<{0}:UserPostCommentDataSource runat=server></{0}:UserPostCommentDataSource>")]
    public class UserPostCommentDataSource : GenericDataSource<Bll.UserPostComment>
    {
    }

    public class UserPostCommentDataSourceDesigner : GenericDataSourceDesigner<Bll.UserPostComment>
    {

        protected override Acms.Bll.UserPostComment GetDesignTimeItem(int index)
        {
            string[] titles = { "Its great what you can do...", "What Rubbish", "I agree", "Don't you think so?" };
            string[] comments = { "You can do everything", "No thats not the case. IMO you cant do it like that.", "I agree with everyting Jim says....", "Don't you think It better this way then it used to be. All in  all a big improvment." };
            
            Random rnd = new Random();
            Bll.UserPostComment tmp = Bll.UserPostComment.CreateInstance(rnd.Next(1, 100), rnd.Next(1, 100), System.Net.IPAddress.Parse("127.1.1.0"));

            int current = rnd.Next(0, titles.Length);

            tmp.Comment = comments[current];
            tmp.Title = titles[current];

            return tmp;
        }
    }
}
